//
//  MineButton.m
//  FreeTravel
//
//  Created by 徐康 on 16/8/30.
//  Copyright © 2016年 KX. All rights reserved.
//

#import "MineButton.h"

@implementation MineButton
- (instancetype)initWithFrame:(CGRect)frame WithTitle:(NSString *)title image:(UIImage *)image{
    self = [super initWithFrame:frame];
    if (self) {
        self.imageViewOfICon = [[UIImageView alloc]init];
        self.imageViewOfICon.image = image;
        self.label = [[UILabel alloc]init];
        self.label.text = title;
        self.label.textAlignment = NSTextAlignmentCenter;
        self.label.textColor = [UIColor whiteColor];
        [self addSubview:self.imageViewOfICon];
        [self addSubview:self.label];
        self.imageViewOfICon.frame = CGRectMake((self.frame.size.width-30)/2, 20, 30, 30);
        self.label.frame = CGRectMake(10, 60, self.frame.size.width - 20, 20);
    }
    return self;
}
@end
